package controller;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.swing.JOptionPane;

import repositorio.PalestraRepositorio;

import model.Aluno;

import model.Aluno;
import model.Palestra;
import repositorio.AlunoRepositorio;
import repositorio.PalestraRepositorio;


public class ServletCadastroPalestra implements Logica{

	
	@Override
	public void acao(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
		
		
		Palestra palestra = new Palestra();
		
		palestra.setNome_palestra(request.getParameter("titulo_txt"));
		palestra.setPalestrante(request.getParameter("palestrante_txt"));
		palestra.setCarga_horaria(request.getParameter("cargaH_txt"));
		//palestra.setNumeroPalestra(1);
		
		PalestraRepositorio palestrarepositorio = new PalestraRepositorio();
		palestrarepositorio.inserirPalestra(palestra);
		
		//palestra.setNumeroPalestra(request.getParameter());
		
		//usuario.setNome(request.getParameter("nome"));
			
		
		//RequestDispatcher view = request.getRequestDispatcher("cadUsuario.jsp");
		//view.forward(request, response);

	}		
	
}